<%@ page language="java" contentType="text/html; charset=utf-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<%@ include file="/commons/commonList.jsp" %>
<html>
<head>
<script language="JavaScript"  src="${ctx}/scripts/common/prototype.js"></script>
<script type="text/javascript">
 	function resize(){
		parent.window.document.all('callInPersonList').style.height=document.body.scrollHeight;
	}
	//来访人员详细信息
	function showDetail(){
		parent.showDetail();
	}

	//当改点选表格行数据时，触发本事件
	function changeID(id){
		$('edit_guestRecordId').value=id;
	}

	function freshFrame(){
		document.forms.ec.ec_p.value=document.getElementById("ec_p").value;
		document.forms.ec.submit();
	}
</script>

</head>
<body onload="resize()">
<input type="hidden" name="edit_guestRecordId" value="" />
<!-- 主线界面公用这个页面,如果是主线界面,这部分显示,用isShowMenu表示 -->
<c:if test="${!isShowMenu}">
<div style="overflow:auto; height:265px;" id="divId">
</c:if>
<ec:ceTable items="callInPersonList"
	action="${ctx}/customer_callInPersonAction.do?method=pageCallInPersonList"
	var="callInPersonItem"
	view="pmsview"
	styleClass="gridData2"
	rowsDisplayed="15" >
	<ec:ceRow styleClass="grid"
	ondblclick="showDetail()" onclick="changeID(${callInPersonItem.guestRecordId})" onContextMenu="if(${!isShowMenu})return false;return ShowContextMenu(event,'quick_rightmenu')" >
		<ec:ceColumn headerCell="pmsHeadrCell" title="姓名" property="participantName" sortable="true" width="5%" styleClass="align_left" />
		<ec:ceColumn headerCell="pmsHeadrCell" title="来访地址" property="address" width="8%" styleClass="align_left"/>
		<ec:ceColumn headerCell="pmsHeadrCell" title="被访问者姓名" property="interviewee" width="8%" styleClass="align_left"/>
		<ec:ceColumn headerCell="pmsHeadrCell" title="来访时间" property="commingTime" sortable="true" width="12%" styleClass="align_left"/>
		<ec:ceColumn headerCell="pmsHeadrCell" title="离开时间" property="goingTime" sortable="true" width="12%" styleClass="align_left"/>
		<ec:ceColumn headerCell="pmsHeadrCell" title="证件类型" property="certificateTypeName"  width="8%" styleClass="align_left"/>
		<ec:ceColumn headerCell="pmsHeadrCell" title="证件号码" property="certificateNo" sortable="true" width="12%" styleClass="align_left"/>
		<ec:ceColumn headerCell="pmsHeadrCell" title="联系电话" property="telephone" width="11%" styleClass="align_left"/>
	</ec:ceRow>
</ec:ceTable>
<!-- 主线界面公用这个页面,如果是主线界面,这部分显示,用isShowMenu表示 -->
<c:if test="${ !isShowMenu}">
</div>
</c:if>
<!--------------menu01------------------------->
<div id="quick_rightmenu" style="display:none;" oncontextmenu="return false" class="quick_rightmenu">
  <table width="100%" border="0" cellpadding="0" cellspacing="0" class="grid_quickMenu_bg">
    <tr>

      <td><table width="100%" border="0" cellpadding="2" cellspacing="0">
         <pms:AuthTag authName="customer_callInPersonAction.do?method=initCallInPersonAdd">
        <tr>
          <td class="quickMenu_toolbarico"><a href="#"  onClick="parent.openNewWindow();" onFocus="this.blur()"><img src="${ctx}/images/ico_newfile.gif" border="0" align="absbottom" alt="新建"/>&nbsp;新 建</a></td>
          </tr>
          </pms:AuthTag>
          <pms:AuthTag authName="customer_callInPersonAction.do?method=initCallInPersonEdit">

		<tr>
          <td class="quickMenu_toolbarico"><a href="#" onFocus="this.blur()" onClick="parent.openEditWindow();"><img src="${ctx}/images/ico_amend.gif" alt="" width="16" height="16" border="0" align="absbottom"> 修
              改</a></td>
          </tr>
          </pms:AuthTag>
        <pms:AuthTag authName="customer_callInPersonAction.do?&method=deleteCallInPerson">
       <tr>
          <td class="quickMenu_toolbarico"><a href="#" onClick="parent.showDelete();" onFocus="this.blur()"><img src="${ctx}/images/ico_delete.gif" alt="" width="16" height="16" border="0" align="absbottom"> 删
              除</a></td>
          </tr>
          </pms:AuthTag>

      </table></td>
    </tr>
  </table>
 <script type="text/javascript">

	var div1=document.getElementById('quick_rightmenu');
	if(div1.getElementsByTagName("tr").length==1){
	div1.innerHTML="";
	}
</script>
</div>

</body>
</html>